package com.mapper;

import javafx.concurrent.Worker;

public interface WorkerMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Worker record);

    int insertSelective(Worker record);

    Worker selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Worker record);

    int updateByPrimaryKey(Worker record);

    @Select("select * from  mybatis.tb_worker where id=#{id}")
    Worker selectWorker(int id);

    @Insert("insert into mybatis.tb_worker(name, age, sex, worker_id) values (#{name},#{age},#{sex},#{workerId})")
    int insertWorker(Worker worker);

    @Update("update mybatis.tb_worker set name = #{name},age=#{age},worker_id=#{id}")
    int updateWorker(Worker worker);

    @Delete("delete from mybatis.tb_worker where id=#{id}")
    int deleteWorker(int id);

    @Select("select *from mybatis.tb_worker where id = #{param01} and name= #{param02}")
    Worker selectWorkerByIdAndName(@Param("param01") int id, @Param("param02") String name);
}
